<cp-navbar (onClickLeft)="onClickLeft()"></cp-navbar>
<div class="error" *ngIf="error"><cp-error (reload)="handleReload()"></cp-error></div>
<div class="loading" *ngIf="loading"><cp-loading></cp-loading></div>
<div class="container" *ngIf="!error && !loading">
  <div class="header">
    <img [src]="detail.Photo" class="avatar" />
    <div class="name-org">
      <p class="name">{{ detail.Name }}</p>
      <p class="org">{{ detail.Organization }}</p>
    </div>
  </div>
  <div class="comment-score">
    <div class="score">
      <span class="text">服务评分</span>
      <div class="rates">
        <i [class]="'icon ' + item" *ngFor="let item of rate; index as i" (click)="setRate(i)"></i>
      </div>
    </div>
    <div [class]="'level level-' + score">{{ score | commentScore }}</div>
  </div>
  <div class="block comment-content">
    <p class="title">评价内容</p>
    <textarea [(ngModel)]="comment" rows="6" placeholder="给经纪人写点评价吧"></textarea>
  </div>
  <div class="block comment-image">
    <p class="title">上传图片<span>(最多上传6张图片)</span></p>
    <div class="imglist"><cp-image-upload></cp-image-upload></div>
    <div class="footer border-top">
      <div class="d1">匿名评价</div>
      <div class="d2">
        <CheckboxItem [name]="checkItemData.name" [value]="checkItemData.value" [(ngModel)]="checkItemData.checked">
        </CheckboxItem>
      </div>
    </div>
  </div>
</div>
<div class="fill" *ngIf="!loading"></div>
<div class="fixed-bottom" *ngIf="!loading">
  <button class="btn btn-lg btn-block btn-gradient" (click)="submitComment()" [disabled]="disabled">发布评价</button>
</div>
